<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title>采购单列表 - 仓库管理系统</title>
</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">

<div class="layui-body" style="padding:15px;top: 0px;">

    <!-- start sp-wrapper -->
    <link rel="stylesheet" href="/sb/stock.css"/>
    <div class="sp-wrapper">
        <h2 class="sp-title"><span>异常查询</span></h2>
        <div class="sp-tool">
            <span class="fl">
                <form action="/checkout/abnormal_list" method="get">
                    <b> <select style="margin-right:10px;" name="transType">
                        <option selected disabled>所有类型</option>
                        <option th:each="s:${transType}" th:text="${s.getName()}" th:value="${s.getIndex()}">全部</option>
                        </select>
                    </b>
                    <b>
                        <input type="text" th:value="${startDate}" name="startDate" class="date" autocomplete="off"
                               placeholder="开始日期"> -
                        <input type="text" th:value="${endDate}" name="endDate" class="date1" autocomplete="off"
                               placeholder="结束日期">
                    </b>
                    <b><input type="text" id="billNo" name="billNo" autocomplete="off" th:value="${billNo}"
                              placeholder="输入单据编号查询"></b>
                    <b><input type="submit" class="button" value="查询"></b>
                </form>
            </span>
        </div>
        <div class="sp-table">
            <table>
                <thead>
                <tr>
                    <th>序号</th>
                    <th>单据编号</th>
                    <th>SKU</th>
                    <th>商品</th>
                    <th>数量</th>
                    <th>时间</th>
                    <th>异常类型</th>
                    <th>操作人</th>
                </tr>
                </thead>
                <tbody id="sp-data">
                <tr th:each="item:${list}">
                    <td></td>
                    <td th:text="${item.billNo}">CG201903121700193</td>
                    <td th:text="${item.specNumber}"></td>
                    <td th:text="${item.goodsName}">华衣</td>
                    <td th:text="${item.abnormalQuantity}">500</td>
                    <td th:text="${item.billDate +'&nbsp;&nbsp;'+ item.billTime}">2019-03-15</td>
                    <td th:text="${item.transTypeName}"></td>
                    <td th:text="${item.checkoutName}">华衣</td>
                </tr>

                </tbody>
            </table>

        </div>
        <div class="pages">
            <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
        </div>
    </div>
    <script type="text/javascript" src="/sb/jquery.min.js"></script>
    <script type="text/javascript" src="/sb/Tips.min.js"></script>
    <script type="text/javascript">

        layui.use(['laydate', 'layer'], function () {
            $(function () {
                //$('table tr:not(:first)').remove();
                var len = $('table tr').length;
                for (var i = 1; i < len; i++) {
                    $('table tr:eq(' + i + ') td:first').text(i);
                }

            });
            var laydate = layui.laydate;
            var layer = layui.layer;
            //执行一个laydate实例
            laydate.render({
                elem: '.date' //指定元素
                , elem: '.date1'
            });
        });
    </script>
</div>
</body>
<html>
